<%@ codepage=65001%>
<!-- #include file="log.asp" -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<title></title>
<!--<link rel="stylesheet" href="phone/jquery.mobile-1.2.0.min.css" />-->
<link rel="stylesheet" href="phone/my.css" />
<!--<script src="phone/jquery-1.7.2.min.js"></script>
<script src="phone/jquery.mobile-1.2.0.min.js"></script>-->

<link rel="stylesheet" href="phone/jquery.mobile-1.3.1.min.css" />
<!--<link rel="stylesheet" type="text/css" href="phone/iscroll/scrollbar.css">
<script type="application/javascript" src="phone/iscroll/iscroll.js"></script>-->
<script src="phone/jquery-1.9.1.min.js"></script>
<script src="phone/jquery.mobile-1.3.1.min.js"></script>
<!--<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.4"></script>-->
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.5&ak=6a4a1e6d74e29f0d16079de275007732"></script>
<script type="text/javascript" src="http://developer.baidu.com/map/jsdemo/demo/convertor.js"></script>
<!--<script src="baiduAPI/RichMarker_min.js"></script>-->
<script src="phone/mymap.js"></script>
<!-- User-generated css -->
<style type="text/css">
/*html,body{overflow: auto}*/
#content {width: 100%;height: 100%;overflow: hidden; margin:0;}

.ui-icon-test{background:url('phone/img/position.png') no-repeat 0 0; width:60px; height:60px}

#updateposition{background:url('phone/img/functional/updateposition.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}
#customervisit{background:url('phone/img/functional/customervisit.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}
#workweekly{background:url('phone/img/functional/workweekly.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}
#activity{background:url('phone/img/functional/activity.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}
#drivingdirections{background:url('phone/img/functional/drivingdirections.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}
#checkonwork{background:url('phone/img/functional/checkonwork.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}
#historicalroute{background:url('phone/img/functional/historicalroute.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}
#signupto{background:url('phone/img/functional/signupto.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}
#commissioned{background:url('phone/img/functional/commissioned.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}
#lessregistration{background:url('phone/img/functional/lessregistration.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}
#addressbook{background:url('phone/img/functional/addressbook.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}
#notice{background:url('phone/img/functional/notice.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}
#complaintandadvice{background:url('phone/img/functional/complaintandadvice.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}
#maintenancereport{background:url('phone/img/functional/maintenancereport.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}
#siteselection{background:url('phone/img/functional/siteselection.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}
#thematicmaps{background:url('phone/img/functional/thematicmaps.png') no-repeat 5px 5px;background-size:60px 60px; width:70px; height:70px;}

</style>
<!-- User-generated js -->
<script>
//[{"basicInfo":{"realname":"刘晓","userId":41755294,"updatetime":"2012-10-17T12:55:22.000+0000","birthday":null,"baseId":30},"userDepartment":{"id":2,"departmentId":1,"userId":41755294,"createTime":"2012-10-17T12:55:22.000+0000","updateTime":"2012-10-17T12:55:22.000+0000","departmentName":"云服务事业部","adminId":7380}},{"basicInfo":{"realname":"溜溜","userId":50818966,"updatetime":"2012-10-17T13:31:57.000+0000","birthday":null,"baseId":32},"userDepartment":{"id":4,"departmentId":1,"userId":50818966,"createTime":"2012-10-17T13:31:57.000+0000","updateTime":"2012-10-17T13:31:57.000+0000","departmentName":"云服务事业部","adminId":7380}},{"basicInfo":{"realname":"刘御","userId":56729586,"updatetime":"2012-11-03T12:46:32.000+0000","birthday":null,"baseId":45},"userDepartment":{"id":17,"departmentId":12,"userId":56729586,"createTime":"2012-11-03T12:46:32.000+0000","updateTime":"2012-11-03T12:46:32.000+0000","departmentName":"技术部","adminId":7380}},{"basicInfo":{"realname":"测试人员1","userId":86701378,"updatetime":"2012-12-31T07:15:29.000+0000","birthday":null,"baseId":57},"userDepartment":{"id":24,"departmentId":1,"userId":86701378,"createTime":"2012-12-31T07:15:29.000+0000","updateTime":"2012-12-31T07:15:29.000+0000","departmentName":"云服务事业部","adminId":7380}},{"basicInfo":{"realname":"zhu ","userId":75937469,"updatetime":"2013-03-09T01:23:16.000+0000","birthday":null,"baseId":60},"userDepartment":{"id":27,"departmentId":12,"userId":75937469,"createTime":"2013-03-09T01:23:16.000+0000","updateTime":"2013-03-09T01:23:16.000+0000","departmentName":"技术部","adminId":7380}},{"basicInfo":{"realname":"闵益飞","userId":34726742,"updatetime":"2012-07-30T14:23:09.000+0000","sex":1,"birthday":"2009-03-07","baseId":19,"cityCode":115017,"nickname":"飞跃","englishname":"minyifei","privinceCode":115000,"hometownProviceCode":108000,"hometownCityCode":108001},"userDepartment":{"id":20,"position":"测试职位","departmentId":1,"userId":34726742,"createTime":"2012-11-07T15:36:30.000+0000","updateTime":"2012-11-07T15:36:30.000+0000","departmentName":"云服务事业部","adminId":7380}},{"basicInfo":{"realname":"六小时","userId":98545223,"updatetime":"2012-11-19T14:59:41.000+0000","birthday":null,"baseId":52},"userDepartment":{"id":21,"departmentId":13,"userId":98545223,"createTime":"2012-11-19T14:59:41.000+0000","updateTime":"2012-11-19T14:59:41.000+0000","departmentName":"人事部","adminId":7380}},{"basicInfo":{"realname":"大厅","userId":47561788,"updatetime":"2012-11-19T15:00:52.000+0000","birthday":null,"baseId":53},"userDepartment":{"id":22,"departmentId":13,"userId":47561788,"createTime":"2012-11-19T15:00:52.000+0000","updateTime":"2012-11-19T15:00:52.000+0000","departmentName":"人事部","adminId":7380}},{"basicInfo":{"realname":"shenm","userId":52796554,"updatetime":"2012-11-19T15:02:30.000+0000","birthday":null,"baseId":54},"userDepartment":{"id":23,"departmentId":13,"userId":52796554,"createTime":"2012-11-19T15:02:30.000+0000","updateTime":"2012-11-19T15:02:30.000+0000","departmentName":"人事部","adminId":7380}},{"basicInfo":{"realname":"张四","userId":10,"updatetime":"2013-03-18T08:20:14.000+0000","sex":1,"birthday":"1978-06-09","baseId":4,"cityCode":107011,"nickname":"我要测试","englishname":"jordan","privinceCode":107000,"hometownProviceCode":116000,"hometownCityCode":116001},"userDepartment":{"id":25,"position":"","departmentId":1,"userId":10,"createTime":"2013-01-30T05:21:05.000+0000","updateTime":"2013-01-30T05:21:05.000+0000","departmentName":"云服务事业部","adminId":7380}},{"basicInfo":{"realname":"韩抗","userId":75697527,"updatetime":"2012-11-14T09:38:01.000+0000","sex":1,"birthday":"1977-02-12","baseId":26,"cityCode":100003,"nickname":"灰色虎纹猫","englishname":"","privinceCode":100000,"hometownProviceCode":0},"userDepartment":{"id":26,"position":"","departmentId":1,"userId":75697527,"createTime":"2013-01-30T05:21:19.000+0000","updateTime":"2013-01-30T05:21:19.000+0000","departmentName":"云服务事业部","adminId":7380}}]

//[{"basicInfo":{"realname":"张静","userId":3429074,"updatetime":"2013-04-02T07:29:51.000+0000","birthday":null,"baseId":67},"userDepartment":{"id":30,"departmentId":15,"userId":3429074,"createTime":"2013-04-02T07:29:51.000+0000","updateTime":"2013-04-02T07:29:51.000+0000","departmentName":"dd","adminId":51649347}},{"basicInfo":{"realname":"枫","userId":84984309,"updatetime":"2013-04-02T07:35:17.000+0000","birthday":null,"baseId":68},"userDepartment":{"id":31,"departmentId":15,"userId":84984309,"createTime":"2013-04-02T07:35:17.000+0000","updateTime":"2013-04-02T07:35:17.000+0000","departmentName":"dd","adminId":51649347}},{"basicInfo":{"realname":"越文","userId":56172791,"updatetime":"2013-04-02T08:48:12.000+0000","birthday":null,"baseId":69},"userDepartment":{"id":32,"departmentId":15,"userId":56172791,"createTime":"2013-04-02T08:48:12.000+0000","updateTime":"2013-04-02T08:48:12.000+0000","departmentName":"dd","adminId":51649347}},{"basicInfo":{"realname":"越文","userId":81333438,"updatetime":"2013-04-02T09:23:03.000+0000","birthday":null,"baseId":70},"userDepartment":{"id":33,"departmentId":15,"userId":81333438,"createTime":"2013-04-02T09:23:03.000+0000","updateTime":"2013-04-02T09:23:03.000+0000","departmentName":"dd","adminId":51649347}},{"basicInfo":{"realname":"huangbin427@163.com","userId":84031356,"updatetime":"2013-05-06T07:29:20.000+0000","birthday":null,"baseId":92},"userDepartment":{"id":35,"departmentId":15,"userId":84031356,"createTime":"2013-05-06T07:29:20.000+0000","updateTime":"2013-05-06T07:29:20.000+0000","departmentName":"dd","adminId":51649347}},{"basicInfo":{"realname":"黄斌","userId":82891674,"updatetime":"2013-04-28T08:38:24.000+0000","sex":1,"birthday":"1984-04-11","baseId":90,"nickname":"","englishname":"","hometownProviceCode":0},"userDepartment":{"id":36,"position":"cto","departmentId":15,"userId":82891674,"createTime":"2013-05-06T08:12:43.000+0000","updateTime":"2013-05-06T08:12:43.000+0000","departmentName":"dd","adminId":51649347}}]

//goodsxc@foxmail.com=anBrOEhQSUZ0Z3VRcVBocmdUS21zZz09OitCdWxOakdLb2JTMmlMRzNSWnJHL3c9PQ

//[{"userId":10,"lastCoords":"POINT (39.1 116.5)","lastSource":"unkown","lastUpdateTime":"2013-05-03T01:31:27.000+0000"}]

var map;
var marker;
var infoWindow;
var usersJson = {};
var userIdOnly = null;
var usersMakerArr = [];

//UG0rZ3lFMk9SYVFwdFdRUnlXYUVTQT09Om5iYVZoZGYxdnhjdEc1M2NVU21zdVE9PQ
var token = getQueryString("token");

var userTokenInfo = null;

var userIdTracks = null;

var contentHeigth = 0;
var myPosiotnCtrl = null;

//var token = "UG0rZ3lFMk9SYVFwdFdRUnlXYUVTQT09Om5iYVZoZGYxdnhjdEc1M2NVU21zdVE9PQ";

var positionLng=null;	//113.12234
var positionLat=null;	//23.02147
//var positionLng=116.303125;	//113.12234
//var positionLat=39.902989;	//23.02147
var timerListenersPopup = null;	//监听popup是否显示的定时器
var timerListenersPosition = null;	//定位定时器
function onLoad()
{
	map = new BMap.Map("content");
	map.centerAndZoom(new BMap.Point(116.404, 39.915), 16);
	map.addControl(new BMap.NavigationControl({anchor: BMAP_ANCHOR_BOTTOM_RIGHT, type: BMAP_NAVIGATION_CONTROL_ZOOM}));  //右下角，仅包含缩放按钮
	map.enableScrollWheelZoom();    //启用滚轮放大缩小，默认禁用
	map.enableContinuousZoom();    //启用地图惯性拖拽，默认禁用
	
	// 创建控件
	myPosiotnCtrl = new PosiotnControl();
	// 添加到地图当中
	map.addControl(myPosiotnCtrl);
	
	//alert(TPhoneBrowserInfo.isCL());
	//alert(navigator.userAgent);
	
	//timerListenersPopup = setInterval(listenersPopup, 2000);
	
	//window.setTimeout(test,2000);
	$.ajax({
		beforeSend :function(xhr){
			//xhr.setRequestHeader("CONTENT-TYPE", "multipart/form-data");
			//xhr.setRequestHeader('auth_token',token);//设置消息头
			
		},
		type: "post",
		//url : "http://116.213.72.48/mediawiki/index.php/User_me",
		url : "httpHeader.asp",
		dataType:"json",
		data: "token="+token+"&url=http://api.laijiaoliu.com/me&type=me",
		success: function(json)
		{
			//userTokenInfo = {"userId":51649347,"state":1,"email":"3@3.com","emailFlag":0,"createTime":"2012-08-05T14:03:36.000+0000","updateTime":"2013-07-18T04:42:02.000+0000","friendCount":0,"auth_token":"N2FKT21DQUN0V0FaZ04yN29hUitWdz09OjNid2JJbXprekJhTHB1VzhzSVdHaGc9PQ","lastLoginTime":"2013-07-18T04:42:02.000+0000","mobileFlag":0,"lastLoginIp":1033227342,"sns_accounts":[],"uploadLocation":0};
			//$("#uploadPosition").html("<p><font style='font-weight:600'>"+obj2str(json)+"</font></p>");
			//$("#uploadPosition").popup("open");
			//alert(json);
			
			userTokenInfo = json;
			userIdOnly = userTokenInfo.userId;
			usersJson[userIdOnly] = {};
			usersJson[userIdOnly].userId = userIdOnly;
			usersJson[userIdOnly].username = userTokenInfo.email;
			usersJson[userIdOnly].state = userTokenInfo.state;
			usersJson[userIdOnly].emailFlag = userTokenInfo.emailFlag;
			usersJson[userIdOnly].createTime = userTokenInfo.createTime;
			usersJson[userIdOnly].updateTime = userTokenInfo.updateTime;
			usersJson[userIdOnly].friendCount = userTokenInfo.friendCount;
			usersJson[userIdOnly].auth_token = userTokenInfo.auth_token;
			usersJson[userIdOnly].lastLoginTime = userTokenInfo.lastLoginTime;
			usersJson[userIdOnly].mobileFlag = userTokenInfo.mobileFlag;
			usersJson[userIdOnly].lastLoginIp = userTokenInfo.lastLoginIp;
			usersJson[userIdOnly].sns_accounts = userTokenInfo.sns_accounts;
			usersJson[userIdOnly].uploadLocation = userTokenInfo.uploadLocation;
			//timerListenersPopup = setInterval(listenersPopup, 2000);
			listenersPopup();
			$.ajax({
				type: "get",
				//url : "http://116.213.72.48/mediawiki/index.php/User_me",
				url : "json_userPhoneInfoSave.asp",
				dataType:"json",
				data: "userJson=["+obj2str(userTokenInfo)+"]&userType=one&token="+token,
				success: function(msg)
				{
					
				}
			});
		}
	});
	
	//jmAjax(url,data,m,type,fun)
	
	
	//jmAjax(url,data,"get","text",searchNearResult);
	
	//添加上传照片事件
	/*$("#btnCamera").click(function(){
		$("#file").click();
	});*/
	
	$("#uploadButton").click(function(){
		$("#userIdOnlyMsg").val(userIdOnly);
		document.body.style.overflow='hidden';
		$("#getPositionMsgForm").submit();
		window.history.back();
	});
	
	$("#btnCamera").click(function(){
		$("#file").click();
	});
	
	$("#file").change(function(){
		$("#userIdOnlyMsg").val(userIdOnly);
		$("#formFile").submit();
	});
}

function setFile(file){
	$("#imgUrlCaiJi").val(file);
	$("#imgPicture").attr("src",file).show();
}

function listenersPopup()
{
	//-9999px	-99999px
	//if(($("#searchWin-popup").css("left")=="-9999px" && $("#searchWin-popup").css("top")=="-99999px") && ($("#getPositionMsgBar-popup").css("left")=="-9999px" && $("#getPositionMsgBar-popup").css("top")=="-99999px") && ($("#uploadPosition-popup").css("left")=="-9999px" && $("#uploadPosition-popup").css("top")=="-99999px"))
	//{
		if(!usersJson[userIdOnly].timerListenersPosition)
		{
			usersJson[userIdOnly].timerListenersPosition = setInterval(function(){
				updatePosition_Android();
			}, 2000);
		}
		else
		{
			usersJson[userIdOnly].userIdOnly = null;
			usersJson[userIdOnly].username = null;
			usersJson[userIdOnly].lng = null;
			usersJson[userIdOnly].lat = null;
			usersJson[userIdOnly].state = null;
			usersJson[userIdOnly].emailFlag = null;
			usersJson[userIdOnly].createTime = null;
			usersJson[userIdOnly].updateTime = null;
			usersJson[userIdOnly].friendCount = null;
			usersJson[userIdOnly].auth_token = null;
			usersJson[userIdOnly].lastLoginTime = null;
			usersJson[userIdOnly].mobileFlag = null;
			usersJson[userIdOnly].lastLoginIp = null;
			usersJson[userIdOnly].sns_accounts = null;
			usersJson[userIdOnly].uploadLocation = null;
			map.removeOverlay(usersJson[userIdOnly].infoWindow);
			usersJson[userIdOnly].infoWindow = null;
			map.removeOverlay(usersJson[userIdOnly].marker);
			usersJson[userIdOnly].marker = null;
			clearInterval(usersJson[userIdOnly].timerListenersPosition);
			usersJson[userIdOnly].timerListenersPosition = null;
		}
	//}
	//else
	//{
	//	clearInterval(usersJson[userIdOnly].timerListenersPosition);
	//	usersJson[userIdOnly].timerListenersPosition = null;
	//}
}

/*function timerGetPosition()
{
	if(($("#searchWin-popup").css("left")=="-9999px" && $("#searchWin-popup").css("top")=="-99999px") && ($("#getPositionMsgBar-popup").css("left")=="-9999px" && $("#getPositionMsgBar-popup").css("top")=="-99999px") && ($("#uploadPosition-popup").css("left")=="-9999px" && $("#uploadPosition-popup").css("top")=="-99999px"))
	{
		//window.WebLocation.getPosition();
		updatePosition();
	}
}*/

/*function test()
{
	updatePosition(39.96662*1000000, 116.29394*1000000)
	
	window.setTimeout(test,2000);
}*/

//function updatePosition(latitute, longitute)
var myfnums=0;
function updatePosition_Android()
{
	if(TPhoneBrowserInfo.isCL())
	{
	
		var locationLngLat = eval("("+window.WebLocation.getLocation()+")");
		//$("#getPositionMsgTrue").html("json.userId_0="+userIdOnly);
		//$("#getPositionMsgTrue").popup("open");
		var longitute = locationLngLat.lng;
		var latitute = locationLngLat.lat;
		if(latitute == 0 || longitute == 0)
		{
			return;
		}
		positionLng = longitute/1000000;
		positionLat = latitute/1000000;
		//alert(positionLng+","+positionLat);
		//$("#getPositionMsgTrue").html(positionLng+","+positionLat);
		//$("#getPositionMsgTrue").popup("open");
		translateCallback(new BMap.Point(positionLng, positionLat));
	}
	else
	{
		//alert(positionLng+","+positionLat);
		//$("#getPositionMsgTrue").html(positionLng+","+positionLat);
		//$("#getPositionMsgTrue").popup("open");
		//BMap.Convertor.transMore
		if(myfnums++<1){		
			window.WebLocation.getPosition();
			//alert("通知ios获取坐标_13:59");
		}
		//116.465649, 39.907369
		//BMap.Convertor.translate(new BMap.Point(positionLng, positionLat),0,translateCallback);     //真实经纬度转成百度坐标
	}
	//BMap.Convertor.translate(new BMap.Point(116.465649, 39.907369),0,translateCallback); 
	//translateCallback(new BMap.Point(positionLng, positionLat),userId);
}

function updatePosition(lat,lng)
{
	//alert("ios调用此方法传入坐标了_13:59,"+lat+","+lng);
	//$("#getPositionMsgTrue").html("lnglat_string="+lng+","+lat);
	//$("#getPositionMsgTrue").popup("open");
	var longitute = lng;
	var latitute = lat;
	if(latitute == 0 || longitute == 0)
	{
		return;
	}
	positionLng = longitute/1000000;
	positionLat = latitute/1000000;
	//alert("给地图的坐标是_13:59,"+positionLng+","+positionLat);
	BMap.Convertor.translate(new BMap.Point(positionLng, positionLat),0,translateCallback);     //真实经纬度转成百度坐标
	
	//translateCallback(new BMap.Point(positionLng, positionLat),userId);
}

function translateCallback(point)
{
	//alert(positionLng+"||"+positionLat);
	//alert("纠偏后坐标_13:59："+point.lng+","+point.lat);
	positionLng = point.lng;
	positionLat = point.lat;
	//alert(positionLng+"||"+positionLat);
	usersJson[userIdOnly].lng = positionLng;
	usersJson[userIdOnly].lat = positionLat;
	
	if(typeof usersJson[userIdOnly].marker != "undefined")
	{
		usersJson[userIdOnly].infoWindow = new BMap.InfoWindow("当前位置<br>经度："+positionLng+"<br>纬度："+positionLat,{offset:new BMap.Size(0,-25)});
		usersJson[userIdOnly].marker.addEventListener("click", function(){this.openInfoWindow(usersJson[userIdOnly].infoWindow);});
		usersJson[userIdOnly].infoWindow.redraw();
		usersJson[userIdOnly].marker.setPosition(new BMap.Point(positionLng, positionLat));
	}
	else
	{
		//定位地图中心点
		map.panTo(new BMap.Point(positionLng,positionLat));
		//创建标注
		usersJson[userIdOnly].marker = new BMap.Marker(new BMap.Point(positionLng, positionLat),{icon:new BMap.Icon("icons/markerPhone.png", new BMap.Size(23,25),{anchor:new BMap.Size(10,25)})});
		//将标注添加到地图中
		map.addOverlay(usersJson[userIdOnly].marker);
		//创建信息窗口
		usersJson[userIdOnly].infoWindow = new BMap.InfoWindow("当前位置<br>经度："+positionLng+"<br>纬度："+positionLat,{offset:new BMap.Size(0,-25)});
		usersJson[userIdOnly].marker.addEventListener("click", function(){this.openInfoWindow(usersJson[userIdOnly].infoWindow);});
		var points = getUsersMarkerPoints(usersJson[userIdOnly]);
		map.setViewport(points);
	}
}

function createPositionMarker()
{
	usersJson[userIdOnly].marker = new BMap.Marker(new BMap.Point(positionLng, positionLat),{icon:new BMap.Icon("icons/markerPhone.png", new BMap.Size(23,25),{anchor:new BMap.Size(10,25)})});
	//将标注添加到地图中
	map.addOverlay(usersJson[userIdOnly].marker);
	//创建信息窗口
	usersJson[userIdOnly].infoWindow = new BMap.InfoWindow("当前位置<br>经度："+positionLng+"<br>纬度："+positionLat,{offset:new BMap.Size(0,-25)});
	//marker.openInfoWindow(infoWindow);
	usersJson[userIdOnly].marker.addEventListener("click", function(){this.openInfoWindow(usersJson[userIdOnly].infoWindow);});
	getUsersMarkerPoints(usersJson[userIdOnly]);
	
	for(var i=0;i<usersMakerArr.length;i++)
	{
		usersMakerArr[i].marker = new BMap.Marker(new BMap.Point(usersMakerArr[i].lng, usersMakerArr[i].lat),{icon:new BMap.Icon("icons/markerPhone.png", new BMap.Size(23,25),{anchor:new BMap.Size(10,25)})});
		//将标注添加到地图中
		map.addOverlay(usersMakerArr[i].marker);
		//创建信息窗口
		usersMakerArr[i].infoWindow = new BMap.InfoWindow("当前位置<br>经度："+usersMakerArr[i].lng+"<br>纬度："+usersMakerArr[i].lat,{offset:new BMap.Size(0,-25)});
		//marker.openInfoWindow(infoWindow);
		var info = usersMakerArr[i].infoWindow;
		usersMakerArr[i].marker.addEventListener("click", function(){this.openInfoWindow(info);});
		var points = getUsersMarkerPoints(usersMakerArr[i]);
		map.setViewport(points);
	}
}

//动态设置content高度和宽度
var fixgeometry = function() {
	/* Some orientation changes leave the scroll position at something
	* that isn't 0,0. This is annoying for user experience. */
	scroll(0, 0);
	/* Calculate the geometry that our content area should take */
	var header = $("#header");
	var footer = $("#footer");
	var content = $("#content");
	var viewport_height = $(window).height();
	var viewport_width = $(window).width();
	var content_height = viewport_height - header.outerHeight() - footer.outerHeight();
	var content_width = viewport_width;
	
	/* Trim margin/border/padding height */
	content_height -= (content.outerHeight() - content.height());
	content_width -= (content.outerWidth() - content.width());
	content.height(content_height);
	content.width(content_width);
	
	if(myPosiotnCtrl)
	{
		myPosiotnCtrl.setOffset(new BMap.Size(10,$("#content").height()-40));
	}
	
	
	
}; /* fixgeometry */
$(document).ready(function() {
	$(window).bind("orientationchange resize pageshow", fixgeometry);
});

function obj2str(o){
	var r = [];
	if(typeof o =="string") return "\""+o.replace(/([\'\"\\])/g,"\\$1").replace(/(\n)/g,"\\n").replace(/(\r)/g,"\\r").replace(/(\t)/g,"\\t")+"\"";
	if(typeof o =="undefined") return "";
	if(typeof o == "object"){
		if(o===null) return "null";
		else if(!o.sort){
			for(var i in o)
				r.push(i+":"+obj2str(o[i]))
			r="{"+r.join()+"}"
		}else{
			for(var i =0;i<o.length;i++)
				r.push(obj2str(o[i]))
			r="["+r.join()+"]"
		}
		return r;
	}
	return o.toString();
}

function getColleaguePositionFun()
{
 	document.body.style.overflow='auto';
	if($("#colleagueNull").html() != "无结果")
	{
		//$("#getColleaguePositionBar").popup("open");
		//return;
	}
	var url = "httpHeader.asp";
	//var data = "token="+token+"&url=http://api.laijiaoliu.com/companyUser/company/list";
	var data = "token="+token+"&url=http://api.laijiaoliu.com/company/getworkmate";
	jmAjax(url,data,"post","json",getColleaguePositionResult);
	//getColleaguePositionResult()
}

function getColleaguePositionResult(json)
{
	//$("#getPositionMsgTrue").html(obj2str(json));
	//$("#getPositionMsgTrue").popup("open");
	$("#colleagueListResult").html("");
	//map.clearOverlays();
	//createPositionMarker();
	//var obj = eval("("+json+")");
	//var obj = [{"basicInfo":{"realname":"刘晓","userId":41755294,"updatetime":"2012-10-17T12:55:22.000+0000","birthday":null,"baseId":30},"userDepartment":{"id":2,"departmentId":1,"userId":41755294,"createTime":"2012-10-17T12:55:22.000+0000","updateTime":"2012-10-17T12:55:22.000+0000","departmentName":"云服务事业部","adminId":7380}},{"basicInfo":{"realname":"溜溜","userId":50818966,"updatetime":"2012-10-17T13:31:57.000+0000","birthday":null,"baseId":32},"userDepartment":{"id":4,"departmentId":1,"userId":50818966,"createTime":"2012-10-17T13:31:57.000+0000","updateTime":"2012-10-17T13:31:57.000+0000","departmentName":"云服务事业部","adminId":7380}}];
	//var obj = [{"basicInfo":{"realname":"张静","userId":3429074,"updatetime":"2013-04-02T07:29:51.000+0000","birthday":null,"baseId":67},"userDepartment":{"id":30,"departmentId":15,"userId":3429074,"createTime":"2013-04-02T07:29:51.000+0000","updateTime":"2013-04-02T07:29:51.000+0000","departmentName":"dd","adminId":51649347}},{"basicInfo":{"realname":"枫","userId":84984309,"updatetime":"2013-04-02T07:35:17.000+0000","birthday":null,"baseId":68},"userDepartment":{"id":31,"departmentId":15,"userId":84984309,"createTime":"2013-04-02T07:35:17.000+0000","updateTime":"2013-04-02T07:35:17.000+0000","departmentName":"dd","adminId":51649347}},{"basicInfo":{"realname":"越文","userId":56172791,"updatetime":"2013-04-02T08:48:12.000+0000","birthday":null,"baseId":69},"userDepartment":{"id":32,"departmentId":15,"userId":56172791,"createTime":"2013-04-02T08:48:12.000+0000","updateTime":"2013-04-02T08:48:12.000+0000","departmentName":"dd","adminId":51649347}},{"basicInfo":{"realname":"越文","userId":81333438,"updatetime":"2013-04-02T09:23:03.000+0000","birthday":null,"baseId":70},"userDepartment":{"id":33,"departmentId":15,"userId":81333438,"createTime":"2013-04-02T09:23:03.000+0000","updateTime":"2013-04-02T09:23:03.000+0000","departmentName":"dd","adminId":51649347}},{"basicInfo":{"realname":"huangbin427@163.com","userId":84031356,"updatetime":"2013-05-06T07:29:20.000+0000","birthday":null,"baseId":92},"userDepartment":{"id":35,"departmentId":15,"userId":84031356,"createTime":"2013-05-06T07:29:20.000+0000","updateTime":"2013-05-06T07:29:20.000+0000","departmentName":"dd","adminId":51649347}},{"basicInfo":{"realname":"黄斌","userId":82891674,"updatetime":"2013-04-28T08:38:24.000+0000","sex":1,"birthday":"1984-04-11","baseId":90,"nickname":"","englishname":"","hometownProviceCode":0},"userDepartment":{"id":36,"position":"cto","departmentId":15,"userId":82891674,"createTime":"2013-05-06T08:12:43.000+0000","updateTime":"2013-05-06T08:12:43.000+0000","departmentName":"dd","adminId":51649347}}];
	//var obj = [{"displayName":"大厅","userId":51649347,"identityId":89294388,"identityTitle":"大厅","createTime":"2012-11-19T15:00:52.000+0000","updateTime":"2012-11-19T15:00:52.000+0000","aboutMe":"大厅简介","myLogo":"http://api.laijiaoliu.com/download/static/images/default_user_icon.png","followingNum":0,"followedNum":0,"speakCount":0},{"displayName":"黄斌","userId":82891674,"identityId":21969215,"identityTitle":"默认名片","createTime":"2013-04-28T08:37:58.000+0000","updateTime":"2013-04-28T08:37:58.000+0000","verified":0,"aboutMe":"黄斌简介","myLogo":"http://api.laijiaoliu.com/download/static/images/default_user_icon.png","followingNum":0,"followedNum":0,"speakCount":0}];
	//alert(obj.length);
	var obj = json;
	//$("#colleagueListResult").append('<li data-role="divider" data-theme="a">同事列表</li>');
	if(obj.length>0)
	{
		
		/*var num = obj.length;
		for (var i=0;i<num;i++)
		{
			(function(i){
				var oObj=obj[i];
				var userId = obj[i].basicInfo.userId;
				if(typeof usersJson[userId] == "undefined")
				{
					usersJson[userId] = {};
					usersJson[userId].userId = userId;
					usersJson[userId].username = obj[i].basicInfo.realname;
				}
				$("#colleagueListResult").append('<li><a href="#colleagueID'+obj[i].basicInfo.userId+'" onclick="realTimePosition(\''+obj[i].basicInfo.userId+'\')">'+obj[i].basicInfo.realname+'</a><a href="#searchTracks" onclick="userIdTracks=\''+obj[i].basicInfo.userId+'\'">轨迹查询</a></li>');
			})(i);
		}*/
		/*if(obj.length>10)
		{
			var num = 10;
		}
		else
		{
			var num = obj.length;
		}*/
		var num = obj.length;
		for (var i=0;i<num;i++)
		{
			(function(i){
				var oObj=obj[i];
				var userId = obj[i].userId;
				if(typeof usersJson[userId] == "undefined")
				{
					usersJson[userId] = {};
					usersJson[userId].userId = userId;
					usersJson[userId].username = obj[i].displayName;
					//$("#uploadPositionResultMsg").html(usersJson[userId].userId);
					//$("#uploadPositionResultMsg").popup("open");
				}
				//$("#colleagueListResult").append('<li><a href="#nearResultName'+i+'" onclick="toCenterFun(\''+marker+'\',\''+escape(html)+'\','+obj[i].wangdianAddressLng+','+obj[i].wangdianAddressLat+')">'+obj[i].wangdianName+'</a></li>');
				$("#colleagueListResult").append('<li><a href="#colleagueID'+obj[i].userId+'" onclick="realTimePosition(\''+obj[i].userId+'\')">'+obj[i].displayName+'</a><a href="#searchTracks" onclick="userIdTracks=\''+obj[i].userId+'\'"  data-inline="true">轨迹查询</a><a href="http://connection_with_clientmsg?friend_user_id='+obj[i].userId+'&friend_logo='+obj[i].myLogo+'&friend_name='+obj[i].displayName+'" data-role="button" data-theme="e" data-inline="true">E</a></li>');
				
//<p><button id="realTimePositionOnly'+usersJson[userId].userId+'" onclick="realTimePosition(\''+usersJson[userId].userId+'\',1)">轨迹查询</button></p>
/*<p><strong>姓名:</strong></p>
<p>编号:</p>
<p>性别:</p>*/
				
			})(i);
		}
	}
	else
	{
		//$("#colleagueListResult").css("height", "92");
		$("#colleagueListResult").append('<li><a href="#colleagueIDNull">无结果</a></li>');
	}
	$("#colleagueListResult").listview('refresh'); // This also works*/
	//$("#getColleaguePositionBar").popup("open");
	//var params = map.getViewport(arrPoints);
	//map.panTo(params.center);
	//map.setZoom(params.zoom);
	
	$.ajax({
		type: "get",
		//url : "http://116.213.72.48/mediawiki/index.php/User_me",
		url : "json_userPhoneInfoSave.asp",
		dataType:"json",
		data: "userJson="+obj2str(obj)+"&userType=more",
		success: function(msg)
		{
			
		}
	});
}

function realTimePosition(id,type)
{
	var url = "httpHeader.asp";
	var data = "token="+token+"&url=http://api.laijiaoliu.com/location/currentposition?id="+id;
	jmAjax(url,data,"post","json",realTimePositionResult);
	
	if(type!=1||type!="1")
	{
		//$("#getPositionMsgTrue").html(type);
		document.body.style.overflow='hidden';
		window.history.back();
	}
}

function realTimePositionResult(json)
{
	setTimeout(function(){realTimePositionResultFun(json);},500);
}

function realTimePositionResultFun(json)
{
	//json = [{"userId":82891674,"lastCoords":"POINT (39.983051 116.303257)","lastSource":"unkown","lastUpdateTime":"2013-05-08T03:24:41.568+0000"}];
	//alert(obj2str(json));
	//$("#uploadPositionResultMsg").html(obj2str(json)+"===="+json[0].lastCoords+"===="+json.length);
	//$("#uploadPositionResultMsg").popup("open");
	//var userId = json[0].userId;
	if(json.length>0)
	{
		var userId = json[0].userId;
		if(usersJson[userId]&&usersJson[userId].marker)
		{
			usersJson[userId].userId = json[0].userId;
			usersJson[userId].lastSource = json[0].lastSource;
			usersJson[userId].lastUpdateTime = json[0].lastUpdateTime;
			var lastCoords1 = json[0].lastCoords.split("(")[1];
			var lastCoords2 = lastCoords1.split(")")[0];
			var lastCoordsArr = lastCoords2.split(" ");
			usersJson[userId].lat = lastCoordsArr[0];
			usersJson[userId].lng = lastCoordsArr[1];
			usersJson[userId].infoWindow = new BMap.InfoWindow("当前位置<br>经度："+usersJson[userId].lng+"<br>纬度："+usersJson[userId].lat+'<br><button id="realTimePositionOnly'+usersJson[userId].userId+'" onclick="realTimePosition(\''+usersJson[userId].userId+'\',1)">刷新位置</button>',{offset:new BMap.Size(0,-25)});
			//$("#uploadPositionResultMsg").html(usersJson[userId].username);
			//$("#uploadPositionResultMsg").popup("open");
			usersJson[userId].infoWindow.setTitle(usersJson[userId].username);
			usersJson[userId].marker.addEventListener("click", function(){this.openInfoWindow(usersJson[userId].infoWindow);});
			usersJson[userId].infoWindow.redraw();
			usersJson[userId].marker.setPosition(new BMap.Point(usersJson[userId].lng, usersJson[userId].lat));
			//usersMakerArr.push(usersJson[userId]);
			//var points = getUsersMarkerPoints(usersJson[userId]);
			//map.setViewport(points);
			//$("#uploadPositionResultMsg").html("存在="+usersJson[userId].lng+"||"+usersJson[userId].lat);
			//$("#uploadPositionResultMsg").popup("open");
			return;
		}
		//usersJson[userId] = {};
		usersJson[userId].userId = json[0].userId;
		usersJson[userId].lastSource = json[0].lastSource;
		usersJson[userId].lastUpdateTime = json[0].lastUpdateTime;
		var lastCoords1 = json[0].lastCoords.split("(")[1];
		var lastCoords2 = lastCoords1.split(")")[0];
		var lastCoordsArr = lastCoords2.split(" ");
		usersJson[userId].lat = lastCoordsArr[0];
		usersJson[userId].lng = lastCoordsArr[1];
		
		//$("#uploadPositionResultMsg").html("不存在="+usersJson[userId].lng+"||"+usersJson[userId].lat);
		//$("#uploadPositionResultMsg").popup("open");
		
		//定位地图中心点
		map.panTo(new BMap.Point(usersJson[userId].lng,usersJson[userId].lat));
		//创建标注
		usersJson[userId].marker = new BMap.Marker(new BMap.Point(usersJson[userId].lng, usersJson[userId].lat),{icon:new BMap.Icon("icons/markerPhone.png", new BMap.Size(23,25),{anchor:new BMap.Size(10,25)})});
		//将标注添加到地图中
		map.addOverlay(usersJson[userId].marker);
		//创建信息窗口
		usersJson[userId].infoWindow = new BMap.InfoWindow("当前位置<br>经度："+usersJson[userId].lng+"<br>纬度："+usersJson[userId].lat+'<br><button id="realTimePositionOnly'+usersJson[userId].userId+'" onclick="realTimePosition(\''+usersJson[userId].userId+'\',1)">刷新位置</button>',{offset:new BMap.Size(0,-25)});
		usersJson[userId].infoWindow.setTitle(usersJson[userId].username);
		usersJson[userId].marker.addEventListener("click", function(){this.openInfoWindow(usersJson[userId].infoWindow);});
		//usersMakerArr.push(usersJson[userId]);
		var points = getUsersMarkerPoints(usersJson[userId]);
		//$("#uploadPositionResultMsg").html(points.length);
		//$("#uploadPositionResultMsg").popup("open");
		
		map.setViewport(points);
		
		/*usersJson[userId].timerListenersPosition = setInterval(function(){
			realTimePosition(usersJson[userId].userId)
		}, 2000);*/
	}
}

function getUsersMarkerPoints(user)
{
	//alert(usersMakerArr.length);
	var flag = false;
	for(var i=0;i<usersMakerArr.length;i++)
	{
		if(usersMakerArr[i].userId == user.userId)
		{
			flag = true;
			break;
		}
	}
	if(!flag)
	{
		usersMakerArr.push(user);
	}
	//alert(usersMakerArr.length);
	
	var pointsArr = [];
	for(var i=0;i<usersMakerArr.length;i++)
	{
		if(usersMakerArr[i].userId == user.userId)
		{
			usersMakerArr[i].lng = user.lng;
			usersMakerArr[i].lat = user.lat
		}
		pointsArr.push(usersMakerArr[i].marker.getPosition());
	}
	return pointsArr;
}

// 定义一个控件类,即function
function PosiotnControl(){
	// 默认停靠位置和偏移量
	this.defaultAnchor = BMAP_ANCHOR_TOP_LEFT;
	this.defaultOffset = new BMap.Size(10,100);
	// 
	//alert($("#content").height()-30);
}

// 通过JavaScript的prototype属性继承于BMap.Control
PosiotnControl.prototype = new BMap.Control();

// 自定义控件必须实现自己的initialize方法,并且将控件的DOM元素返回
// 在本方法中创建个div元素作为控件的容器,并将其添加到地图容器中
PosiotnControl.prototype.initialize = function(map){
	// 创建一个DOM元素
	/*var div = document.createElement("input");
	div.type = "button";
	div.value = "标注位置";*/
	var div = document.createElement("img");
	div.src = "phone/img/position.png";
	div.style.width = "30px";
	div.style.height = "30px";
	div.onclick = function(){getSelfPositionFun();};
	// 设置样式
	div.style.cursor = "pointer";
	// 添加DOM元素到地图中
	map.getContainer().appendChild(div);
	// 将DOM元素返回
	return div;
}

function searchTracksFun(userId)
{
 	document.body.style.overflow='auto';
	var times = document.getElementById("startTimeTracks").value.split(" ");
	var timee = document.getElementById("endTimeTracks").value.split(" ");
	var startTime = strtotime(times[0],times[1]);
	var endTime = strtotime(timee[0],timee[1]);
	
	//if($("#colleagueNull").html() != "无结果")
	//alert(startTime+"||"+endTime+"||"+userIdTracks);
	var url = "httpHeader.asp";
	//var data = "token="+token+"&url=http://api.laijiaoliu.com/location/usertrack";
	var data = "token="+token+"&url="+escape("http://api.laijiaoliu.com/location/usertrack?startTime="+startTime+"&endTime="+endTime+"&userId="+userIdTracks);
	//var data = "token="+token+"&url=http://api.laijiaoliu.com/company/getworkmate";
	jmAjax(url,data,"post","json",searchTracksFunResult);
	
	//searchTracksFunResult();
	//$("#parkingpage").css({display:"block"});
	window.history.back();
	window.history.back();
	
}
var markerLineInfoTracks = [];
function searchTracksFunResult(obj)
{
	setTimeout(function(){
		
		for(var i=0;i<markerLineInfoTracks.length;i++)
		{
			map.removeOverlay(markerLineInfoTracks[i]);
		}
		//var obj = [{"source":"unkown","userId":10,"createTime":"2013-05-13T06:36:45.000+0000","coords":"POINT (39.90733636652002 116.4655952877506)"},{"source":"android","userId":10,"createTime":"2013-05-15T01:58:31.000+0000","coords":"POINT (39.913997 116.477047)"}];
		//alert(obj2str(json));
		var points = [];
		if(obj.length>0)
		{
			for (var i=0;i<obj.length;i++)
			{
				(function(){
					//POINT (39.90733636652002 116.4655952877506)
					var pointStr = obj[i].coords.substring(7);
					pointStr = pointStr.substring(0,pointStr.length-1);
					pointStr = pointStr.split(" ");
					points.push(new BMap.Point(pointStr[1],pointStr[0]));
					
					var marker = new BMap.Marker(new BMap.Point(pointStr[1],pointStr[0]),{icon:new BMap.Icon("icons/usertrack.png", new BMap.Size(22,21),{anchor:new BMap.Size(10,11)})});
					var label = new BMap.Label("<font style='font-weight:700;font-size:12px;'>"+(i+1)+"</font>",{offset:new BMap.Size(22,10)});
					marker.setLabel(label);
					//将标注添加到地图中
					map.addOverlay(marker);
					/*var htm = '<div style="background-image:url(icons/usertrack.png); width:22px; height:21px; text-align:center"><font style="font-weight:700;font-size:12px;">'+(i+11)+'</font></div>';
					var point = new BMap.Point(pointStr[1],pointStr[0]);
					var marker= new BMapLib.RichMarker(htm,point,{"anchor" : new BMap.Size(-5,-11),"enableDragging" : false});
					map.addOverlay(marker);*/
					markerLineInfoTracks.push(marker);
					//创建信息窗口
					var infoWindow = new BMap.InfoWindow("<font style='font-weight:700;font-size:14px;'>创建时间</font><br><font style='font-size:12px'>"+obj[i].createTime.split(".")[0].replace("T"," ")+"</font>",{offset:new BMap.Size(0,-11)});
					marker.addEventListener("click", function(){this.openInfoWindow(infoWindow);});
					markerLineInfoTracks.push(infoWindow);
				})();
			}
			
			var polyline = new BMap.Polyline(points,{strokeColor:"blue", strokeWeight:3, strokeOpacity:0.5});
			map.addOverlay(polyline);
			markerLineInfoTracks.push(polyline);
			map.setViewport(points);
			
			//map.panTo(points[0]);
		}
	},2000);
	//$("#getPositionMsgTrue").html(obj2str(json));
}
</script>
</head>
<body onLoad="onLoad()">
<div data-role="page" id="parkingpage">
	<div id="header" data-role="header" data-position="inline" data-position="fixed" data-theme="c">
		<!--<a href=""  data-role="button"   id="location"   onclick="getLocation();"></a>-->
		<!--<a href="#searchWin" data-rel="popup" onclick="openPopupSearchWin();">周边查询</a>-->
		<a href="#" onClick="window.history.back();">返回</a>
		<a href="#searchWin" onClick="document.body.style.overflow='auto'">周边查询</a>
		<!--<a href="#gridBar" data-prefetch="true" data-icon="grid" data-transition="fade" onClick="document.body.style.overflow='auto'">列表</a>-->
		<!--<div data-role="popup" id="searchWin" data-theme="d" class="ui-corner-all" style="position:absolute;left:-40px;top:18px;width:220px">
			<fieldset data-role="controlgroup" data-theme="d">
				<input type="search" name="search" id="searcNearID" placeholder="请输入网点名称" value=""/>
				<input type="radio" name="radioDistances" id="distances500" value="500" checked="checked" data-theme="d">
				<label for="distances500">500米</label>
				<input type="radio" name="radioDistances" id="distances1" value="1000" data-theme="d">
				<label for="distances1">1公里</label>
				<input type="radio" name="radioDistances" id="distances5" value="5000" data-theme="d">
				<label for="distances5">5公里</label>
				<input type="radio" name="radioDistances" id="distances10" value="10000" data-theme="d">
				<label for="distances10">10公里</label>
			</fieldset>
			<input type="button" name="searchNearButton" value="确定" data-theme="d" onClick="searchNear();"/>
		</div>-->
		<!--<a href="#getPositionMsg" data-rel="dialog" data-transition="pop">采集</a>-->
		<!--<a href="#uploadPosition" data-rel="popup" data-position-to="window">上传位置</a>-->
		<!--<a href="#uploadPosition">上传位置</a>-->
		<!--<div data-role="popup" id="uploadPosition" data-theme="d" class="ui-corner-all" style="position:absolute;left:-47px;top:-192px;width:200px">
			<fieldset data-role="controlgroup" data-theme="d">
				<label for="uploadPositionTextarea">描述信息</label>
				<textarea cols="40" rows="8"  name="uploadPositionTextarea" id="uploadPositionTextarea"></textarea>
			</fieldset>
			<input type="button" name="uploadPositionButton" value="上传位置" data-theme="d" onClick="uploadPositionFun();"/>
		</div>-->
		
		
		
		<!--上传位置提示框-->
		<div data-role="popup" id="uploadPositionResultMsg">
			<p id="uploadPositionState"><font style="font-weight:600"></font></p>
		</div>
		<!--<div data-role="popup" id="uploadPosition" data-theme="d" class="ui-corner-all" style=" text-align:center;position:absolute;left:-80px;top:18px; width:100px">
			<label for="uploadPositionSuccess" id="uploadPositionSuccess">
				上传成功
			</label>
		</div>-->
		
		<h1>人员定位</h1>
	</div>
	<!--显示地图-->
	<div id="content" data-role="content">
		<!--底部导航栏中的列表内容-->
		<!--<div data-role="popup" id="gridBar" data-theme="d" style="position:absolute;left:-38px;bottom:28px; width:250px; overflow:scroll; overflow-x:hidden; overflow-y:auto;">
			<ul id="listResult" data-role="listview" data-theme="d" data-inset="true">
				<li data-role="divider" data-theme="a">查询结果</li>
				<li>无结果</li>
			</ul>
		</div>-->
		<a href="#nearSearchNull" data-rel="popup" data-position-to="window"/>
		<div data-role="popup" id="nearSearchNull">
			<p><font style="font-weight:600">查询无结果</font></p>
		</div>
		
		<!--下拉列表List-->
		<!--<div data-role="popup" id="gridBar" data-theme="none">
			<div data-role="collapsible-set" data-theme="b" data-content-theme="c" data-collapsed-icon="arrow-r" data-expanded-icon="arrow-d" style="position:absolute;bottom:50px;margin:0; width:250px; height:200px">
				<div data-role="collapsible" data-inset="false">
					<h2>查询结果</h2>
					<ul data-role="listview" id="listResult">
						<li><a href="#">网点1</a></li>
						<li><a href="#">网点2</a></li>
						<li><a href="#">网点3</a></li>
						<li><a href="#">网点4</a></li>
						<li><a href="#">网点5</a></li>
					</ul>
				</div>
			</div>
		</div>-->
		
		<!--底部导航栏中的采集面板-->
		<!--<div data-role="popup" id="getPositionMsgBar" data-theme="d" data-mini="true" style="position:absolute;left:-115px;bottom:28px; width:250px">
			<label for="getPositionLng" id="getPositionLng">
				经度
			</label>
			<label for="getPositionLat" id="getPositionLat">
				纬度
			</label>
			<input id="wangdianName" type="text" name="wangdianName" placeholder="网点名称" value=""/>
			<input id="wangdianNumber" type="text" name="wangdianNumber" placeholder="网点编号" value=""/>
			<input id="landmarksName" type="text" name="landmarksName" placeholder="重要地标名称" value=""/>
			<input id="positionAddress" type="text" name="positionAddress" placeholder="地址" value=""/>
			<input type="button" name="uploadButton" value="信息上传" data-theme="d" onClick="uploadPositionMsg();"/>
		</div>-->
		
		<a href="#getPositionMsgTrue" data-rel="popup" data-position-to="window"></a>
		<div data-role="popup" id="getPositionMsgTrue">
			<p><font style="font-weight:600">采集成功</font></p>
		</div>
		<a href="#getPositionMsgNull" data-rel="popup" data-position-to="window"></a>
		<div data-role="popup" id="getPositionMsgNull">
			<p><font style="font-weight:600">采集失败</font></p>
		</div>
		
		
<!--		<div data-role="popup" id="getColleaguePositionBar" data-theme="d" style="position:absolute;right:-155px;bottom:-180px; width:250px;">
			<ul id="colleagueListResult" data-role="listview" data-theme="d" data-inset="true">
				<li data-role="divider" data-theme="a">同事列表</li>
				<li id="colleagueNull">无结果</li>
			</ul>
		</div>-->
		
		<!--采集成功后的提示-->
		<!--<a href="#searchResultNull" id="showResultNull" data-rel="dialog" data-transition="pop"></a>
		<div data-role="dialog" id="searchResultNull" data-theme="d">
			<ul id="listResult1" data-role="listview" data-theme="d" data-inset="true">
				<li data-role="divider" data-theme="a">查询结果</li>
				<li>无结果</li>
			</ul>
		</div>-->
		
		
		
	</div>
	<!--container用来放地图 -->
	<div id="footer" data-role="footer" data-id="foo1" data-position="fixed" data-theme="c">
		<div data-role="navbar" data-iconpos="top">
			<ul>
			<li>
				<!--<a href="#gridBar" data-prefetch="true" data-rel="popup" data-icon="grid" data-transition="fade">列表</a>-->
				<!--<a href="phone/dialog.html" data-prefetch="true" data-icon="grid" data-transition="fade">列表</a>-->
				<a href="#gridBar" data-prefetch="true" data-icon="grid" data-transition="fade" onClick="document.body.style.overflow='auto'">列表</a>
				<!-- -->
				<!--<div id="gridBar" data-role="popup" data-theme="d" class="ui-corner-all" style="position:absolute;left:-170px;bottom:50px;width:5000px" data-role="fieldcontain">
					<fieldset data-role="controlgroup" data-theme="d">
					<ul data-role="listview" data-inset="true" data-filter="false">
						<li><a href="#">Acura</a></li>
						<li><a href="#">Audi</a></li>
						<li><a href="#">BMW</a></li>
						<li><a href="#">Cadillac</a></li>
						<li><a href="#">Ferrari</a></li>
					</ul>
					</fieldset>
				</div>-->
			</li>
			<!--<li><a id="mapBar" href="#" class="ui-btn-active" data-prefetch="true" data-icon="home" data-transition="fade">地图</a></li>-->
			<li><a href="#getPositionMsgBar" data-prefetch="true" data-icon="star" data-transition="fade" onClick="getPositionMsgFun();">采集</a></li>
			<!--<li><a href="#getSelfPositionBar" data-prefetch="true" data-icon="home" data-transition="fade" onClick="getSelfPositionFun();">我的位置</a></li>-->
			
			<!--<li><a href="#uploadPositionBar" data-prefetch="true" data-rel="popup" data-icon="home" data-transition="fade" onclick="uploadPositionFun();">上传位置</a></li>-->
			<!--<li><a href="#setBar" data-prefetch="true" data-icon="gear" data-transition="fade">设置</a></li>-->
			<li><a href="#getColleaguePositionBar" data-prefetch="true" data-icon="home" data-transition="fade" onClick="getColleaguePositionFun();">同事</a></li>
			<!--<li><a href="phone/dialog.html" data-prefetch="true" data-icon="home" data-transition="fade" onClick="getColleaguePositionFun();">同事</a></li>-->
			<li><a href="#moreFunction" data-prefetch="true" data-icon="home" data-transition="fade" onClick="document.body.style.overflow='auto'">更多功能</a></li>
			</ul>
		</div>
	</div>
</div>
<!--上传位置页面-->
<div data-role="page" id="uploadPosition" data-theme="c">
	<div data-role="header" data-position="inline" data-position="fixed" data-theme="c">
		<a href="#parkingpage" data-role="button" data-direction="reverse" data-rel="back" onClick="document.body.style.overflow='hidden'">返回</a>
		<h1>上传位置</h1>
	</div>
	<fieldset data-role="controlgroup" data-theme="c">
		<!--<label for="uploadPositionTextarea">描述信息</label>-->
		<textarea cols="40" rows="8"  name="uploadPositionTextarea" id="uploadPositionTextarea" placeholder="请输入网点名称"></textarea>
	</fieldset>
	<input type="button" name="uploadPositionButton" value="上传位置" data-theme="d" onClick="uploadPositionFun();"/>
</div>

<!--周边网点查询页面-->
<div data-role="page" id="searchWin" data-theme="c">
	<div data-role="header" data-position="inline" data-position="fixed" data-theme="c">
		<a href="#parkingpage" data-role="button" data-direction="reverse" data-rel="back" onClick="document.body.style.overflow='hidden'">返回</a>
		<h1>周边查询</h1>
	</div>
	<div data-role="content">
		<fieldset data-role="controlgroup" data-theme="c">
			<input type="search" name="search" id="searcNearID" placeholder="请输入网点名称" value=""/>
			<input type="radio" name="radioDistances" id="distances500" value="500" checked="checked" data-theme="d">
			<label for="distances500">500米</label>
			<input type="radio" name="radioDistances" id="distances1" value="1000" data-theme="d">
			<label for="distances1">1公里</label>
			<input type="radio" name="radioDistances" id="distances5" value="5000" data-theme="d">
			<label for="distances5">5公里</label>
			<input type="radio" name="radioDistances" id="distances10" value="10000" data-theme="d">
			<label for="distances10">10公里</label>
		</fieldset>
		<input type="button" name="searchNearButton" value="确定" data-theme="d" onClick="searchNear();"/>
	</div>
</div>

<!--周边网点查询结果列表-->
<div data-role="page" id="gridBar" data-theme="c">
	<div data-role="header" data-position="inline" data-position="fixed" data-theme="c">
		<a href="#parkingpage" data-role="button" data-direction="reverse" data-rel="back" onClick="document.body.style.overflow='hidden'">返回</a>
		<h1>周边查询结果</h1>
	</div>
	<div data-role="content">
		<ul id="listResult" data-role="listview" data-theme="c" data-inset="true" data-filter="false" data-split-icon="grid">
			<li>无结果</li>
		</ul>
	</div>
</div>

<!--同事查询结果列表-->
<div data-role="page" id="getColleaguePositionBar" data-theme="c">
	<div data-role="header" data-position="inline" data-position="fixed" data-theme="c">
		<a href="#parkingpage" data-role="button" data-direction="reverse" data-rel="back" onClick="document.body.style.overflow='hidden'">返回</a>
		<h1>同事列表</h1>
		<!--li><a href="methods.html">网点4</a><span class="ui-li-count">42</span></li>-->
	</div>
	<div data-role="content">
		<ul id="colleagueListResult" data-role="listview" data-theme="c" data-inset="true" data-filter="false" data-split-icon="grid">
			<li>无结果</li>
		</ul>
	</div>
</div>

<div data-role="page" id="getPositionMsgBar" data-theme="c" data-mini="true">
	<div data-role="header" data-position="inline" data-position="fixed" data-theme="c">
		<a href="#parkingpage" data-role="button" data-direction="reverse" data-rel="back" onClick="document.body.style.overflow='hidden'">返回</a>
		<h1>采集信息</h1>
	</div>
	<div data-role="content">
		<label for="getPositionLng" id="getPositionLng">
			经度
		</label>
		<label for="getPositionLat" id="getPositionLat">
			纬度
		</label>
		<!--<a href="#" id="btnCamera" data-role="button" onClick="$('#file').click();">
			选择照片
		</a>-->
		<form action="json_wangdianUploadInfoSave.asp?sType=add" method="post" id="formFile" target="frameFile" enctype="multipart/form-data" style="width:0;height:0;overflow: hidden;">
			<input type="hidden" name="userIdOnlyMsg" id="userIdOnlyMsg" value="">
			<input type="file" name="file" id="file" value="">
		</form>
		<iframe src="javascript:void(0)" id="frameFile" name="frameFile" height="0" width="0" style="width:0;height:0;border:0px solid #fff;"></iframe>	
		<form action="json_wangdianUploadInfoSave.asp?sType=add" method="post" id="getPositionMsgForm" target="frameFile" enctype="multipart/form-data">
			<a href="#" id="btnCamera" data-role="button">
				<img src="http://e.laijiaoliu.com/custom/cbi/resource/images/camera_icon.png" style="width:15px;height:15px;" />
			</a>
			<div class="msg-pic">
				<img src="" style="height: 100px;display:none" id="imgPicture"/>
			</div>
			<!--<input type="hidden" name="picture" id="txtPicture" />-->
			<input id="wangdianName" type="text" name="wangdianName" placeholder="网点名称" value=""/>
			<input id="wangdianNumber" type="text" name="wangdianNumber" placeholder="网点编号" value=""/>
			<input id="landmarksName" type="text" name="landmarksName" placeholder="重要地标名称" value=""/>
			<input id="positionAddress" type="text" name="positionAddress" placeholder="地址" value=""/>
			<input type="hidden" name="getPositionLngValue" id="getPositionLngValue" value="">
			<input type="hidden" name="getPositionLatValue" id="getPositionLatValue" value="">
			<input type="hidden" name="imgUrlCaiJi" id="imgUrlCaiJi" value=""/>
			<!--<input type="button" name="uploadButton" value="信息上传" data-theme="d" onClick="uploadPositionMsg();"/>-->
			<input type="button" name="uploadButton" id="uploadButton" value="信息上传" data-theme="d"/>
		</form>
	</div>
</div>

<!--更多功能列表-->
<div data-role="page" id="moreFunction" data-theme="c">
	<div data-role="header" data-position="inline" data-position="fixed" data-theme="c">
		<a href="#parkingpage" data-role="button" data-direction="reverse" data-rel="back" onClick="document.body.style.overflow='hidden'">返回</a>
		<h1>功能列表</h1>
		<!--li><a href="methods.html">网点4</a><span class="ui-li-count">42</span></li>-->
	</div>
	<div data-role="content">
		<div class="ui-grid-b">
			<div class="ui-block-a" style="text-align:center;">
				<!--<img src="phone/img/position.png" style="width:60px; height:60px"/>-->
				<a href="#uploadPosition" id="updateposition" data-role="button" data-iconpos="top" data-inline="true">
					<!--上传位置-->
				</a>
				<!--<input type="button" style="width:60px; height:60px; background-image:url(phone/img/position.png)"/>-->
			</div>
			<div class="ui-block-b" style="text-align:center;">
				<!--<img src="phone/img/position.png" style="width:60px; height:60px"/>-->
				<a href="#uploadPosition" id="customervisit" data-role="button" data-iconpos="top" data-inline="true">
					<!--客户拜访-->
				</a>
				<!--<input type="button" style="width:60px; height:60px; background-image:url(phone/img/position.png)"/>-->
			</div>
			<div class="ui-block-c" style="text-align:center;">
				<a href="#" data-role="button" data-iconpos="top" data-inline="true" id="workweekly">
					<!--工作周报-->
				</a>
			</div>
		</div>
		<div class="ui-grid-b">
			<div class="ui-block-a" style="text-align:center;">
				<a href="#" data-role="button" data-iconpos="top" data-inline="true" id="drivingdirections">
					<!--驾车导航-->
				</a>
			</div>
			<div class="ui-block-b" style="text-align:center;">
				<a href="#" data-role="button" data-iconpos="top" data-inline="true" id="checkonwork">
					<!--考勤-->
				</a>
			</div>
			<div class="ui-block-c" style="text-align:center;">
				<a href="#" data-role="button" data-iconpos="top" data-inline="true" id="historicalroute">
					<!--历史轨迹-->
				</a>
			</div>
		</div>
		<div class="ui-grid-b">
			<div class="ui-block-a" style="text-align:center;">
				<a href="#" data-role="button" data-iconpos="top" data-inline="true" id="signupto">
					<!--签约上报-->
				</a>
			</div>
			<div class="ui-block-b" style="text-align:center;">
				<a href="#" data-role="button" data-iconpos="top" data-inline="true" id="commissioned">
					<!--任务委托-->
				</a>
			</div>
			<div class="ui-block-c" style="text-align:center;">
				<a href="#" data-role="button" data-iconpos="top" data-inline="true" id="lessregistration">
					<!--少货登记-->
				</a>
			</div>
		</div>
		<div class="ui-grid-b">
			<div class="ui-block-a" style="text-align:center;">
				<a href="#" data-role="button" data-iconpos="top" data-inline="true" id="addressbook">
					<!--通讯录-->
				</a>
			</div>
			<div class="ui-block-b" style="text-align:center;">
				<a href="#" data-role="button" data-iconpos="top" data-inline="true" id="notice">
					<!--通知公告-->
				</a>
			</div>
			<div class="ui-block-c" style="text-align:center;">
				<a href="#" data-role="button" data-iconpos="top" data-inline="true" id="lessregistration">
					<!--少货登记-->
				</a>
			</div>
		</div>
		<div class="ui-grid-b">
			<div class="ui-block-a" style="text-align:center;">
				<a href="#" data-role="button" data-iconpos="top" data-inline="true" id="complaintandadvice">
					<!--投诉建议-->
				</a>
			</div>
			<div class="ui-block-b" style="text-align:center;">
				<a href="#" data-role="button" data-iconpos="top" data-inline="true" id="maintenancereport">
					<!--维修上报-->
				</a>
			</div>
			<div class="ui-block-c" style="text-align:center;">
				<a href="#" data-role="button" data-iconpos="top" data-inline="true" id="siteselection">
					<!--选址-->
				</a>
			</div>
		</div>
		<div class="ui-grid-b">
			<div class="ui-block-a" style="text-align:center;">
				<a href="#" data-role="button" data-iconpos="top" data-inline="true" id="thematicmaps">
					<!--专题地图-->
				</a>
			</div>
			<div class="ui-block-c" style="text-align:center;">
				<a href="#" data-role="button" data-iconpos="top" data-inline="true" id="activity">
					<!--活动-->
				</a>
			</div>
		</div>
		
	</div>
</div>

<!--轨迹查询页面-->
<div data-role="page" id="searchTracks" data-theme="c">
	<div data-role="header" data-position="inline" data-position="fixed" data-theme="c">
		<a href="#getColleaguePositionBar" data-role="button" data-direction="reverse" data-rel="back" onClick="document.body.style.overflow='hidden'">返回</a>
		<h1>轨迹查询</h1>
		<!--li><a href="methods.html">网点4</a><span class="ui-li-count">42</span></li>-->
	</div>
	<div data-role="content">
		<input id="startTimeTracks" type="text" name="startTimeTracks" placeholder="开始时间,格式:2013-1-1 00:00:00" value="2013-6-25 00:00:00"/>
		<input id="endTimeTracks" type="text" name="endTimeTracks" placeholder="结束时间,格式:2013-1-1 00:00:00" value="2013-6-25 23:59:59"/>
		<input type="button" name="tracksButton" value="查询" data-theme="d" onClick="searchTracksFun();"/>
	</div>
</div>

</body>
</html>